package com.hbisdt.cet.sample.consumer;

import org.apache.rocketmq.spring.core.RocketMQListener;

/**
 * RocketMQ消息消费者
 * 该消费者与RocketMQConsumer订阅同一个topic，订阅的消费者组与RocketMQConsumer订阅的消费者组不同,该topic下有新消息时，该消费者与RocketMQConsumer都会收到消息
 * @author : 教学案例
 * @version : 1.0
 * @date : 2025-04-29 15:52
 */
//@Component
//@RocketMQMessageListener(topic = "CarbonEmission", consumerGroup = "diff_group")
public class RocketMQConsumerDiffGroup implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("consumerDiffGroup 收到消息: " + message);
    }
}
